﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlTypes;
using System.Drawing.Imaging;


namespace LowLevelGraphics
{
    /// <summary>
    /// Summary description for Object.
    /// </summary>
    public class ObjectExtractorObject : CollectionBase
    {
        /// 					
        private int label = 0;
        private int startX = 0, startY = 0;
        private int finalX = 0, finalY = 0;

        /// <summary>
        /// Initializes a new instance of the <see cref="ObjectExtractorObject"/> class.
        /// </summary>
        public ObjectExtractorObject()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        /// <summary>
        /// Adds the specified i.
        /// </summary>
        /// <param name="i">The i.</param>
        public void Add(ObjectExtractorObject i)
        {
            List.Add(i);
        }

        /// <summary>
        /// Remove given object from list
        /// </summary>
        /// <param name="i"></param>
        public void Remove(ObjectExtractorObject i)
        {
            List.Remove(i);
        }

        /// <summary>
        /// Gets the width
        /// </summary>
        /// <returns></returns>
        public int getWidth()
        {
            return finalX - startX;
        }

        /// <summary>
        /// Gets the height
        /// </summary>
        /// <returns></returns>
        public int getHeight()
        {
            return finalY - startY;
        }

        /// <summary>
        /// Gets or sets startX
        /// </summary>
        public int StartX
        {
            get { return startX; }
            set { startX = value; }
        }

        /// <summary>
        /// Gets or sets label
        /// </summary>
        public int Label
        {
            get { return label; }
            set { label = value; }
        }

        /// <summary>
        /// Gets or sets startY
        /// </summary>
        public int StartY
        {
            get { return startY; }
            set { startY = value; }
        }

        /// <summary>
        /// Gets or sets FinalY
        /// </summary>
        public int FinalY
        {
            get { return finalY; }
            set { finalY = value; }
        }

        /// <summary>
        /// Gets or sets FinalX
        /// </summary>
        public int FinalX
        {
            get { return finalX; }
            set { finalX = value; }
        }

        /// <summary>
        /// Gets or sets object extractor object in list
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public ObjectExtractorObject this[int index]
        {
            get { return (ObjectExtractorObject)List[index]; }
            set { this.List[index] = (ObjectExtractorObject)value; }
        }
    }
}
